home *** CD-ROM | disk | FTP | other *** search
Makefile | 1993-01-22 | 8.6 KB | 292 lines |
- # (c) Copyright 1992 by Panagiotis Tsirigotis
- # All rights reserved. The file named COPYRIGHT specifies the terms
- # and conditions for redistribution.
-
- #
- # $Id: Makefile,v 5.18 1993/01/23 02:04:43 panos Exp $
- #
- # Based on Program makefile template: *Revision: 1.14 *
- #
-
- #
- # Available entries:
- # $(NAME) --> create the program (this is the default target)
- # install --> install the program (and man page)
- # uninstall --> uninstall the program (and man page)
- # clean --> cleanup
- # spotless --> clean + uninstall
- # lint --> lints a specific file (usage: make lint MODULE=foo.c)
- # lintall --> lint all files
- # tags --> creates a tags file
- # checkout --> checkout all files
- #
-
- #
- # The following variables must be set by you
- #
- NAME = xinetd
- VERSION = 2.0.6
-
- #
- # Possible flags that can be defined in DEFS:
- #
- # -DNO_POSIX_TYPES if your OS does not know about POSIX types like pid_t
- # -DNO_TERMIOS if you don't have /usr/include/sys/termios.h
- # -DOLD_WAIT if your OS supports union wait
- # -DNO_RPC if your OS does not support RPC
- # -DNO_SIGLIST if your C library does not contain sys_siglist
- #
- # A note about signal handling:
- # Case 1: POSIX signal handling is supported
- # You don't need to define anything
- # Case 2: BSD signal handling is supported (i.e. sigvec(2))
- # Use -DNO_POSIX_SIGS
- # Case 3: None of the above
- # Use -DNO_POSIX_SIGS and -DNO_SIGVEC
- #
- # Available debug flags:
- # DEBUG code is being debugged
- # DEBUG_SERVER forked server will do a sleep
- # DEBUG_INTERCEPTOR forked interceptor will do a sleep
- # DEBUG_SIGNALS code that handles SIGSEGV and SIGBUS
- # DEBUG_LOGGING forked logging server will do a sleep
- # DEBUG_SHUTDOWN forked shutdown server will do a sleep
- # DEBUG_TPCINT enable debugging code in the tcp interceptor
- # DEBUG_UDPINT enable debugging code in the udp interceptor
- #
- DEFS=-DDEBUG -DDEBUG_SIGNALS
-
- DEBUG = -g # either -g or -O
- LDFLAGS = -L$(LIBDIR)$(DEBUG)
- LIBS = -lsio -lmisc -lstr -lfsma -lpset -lxlog
-
- HDRS = \
- access.h \
- addr.h \
- attr.h \
- builtin.h \
- conf.h config.h connection.h \
- defs.h \
- flags.h \
- int.h \
- log.h logoptions.h \
- mask.h \
- parse.h \
- sconf.h server.h service.h state.h
-
- SRCS = \
- access.c addr.c \
- builtins.c \
- child.c conf.c connection.c \
- env.c exit.c \
- flags.c \
- ident.c init.c int.c intcommon.c internals.c \
- log.c logctl.c \
- main.c msg.c \
- nvlists.c \
- parse.c parsers.c \
- reconfig.c retry.c \
- sconf.c server.c service.c servtab.c shutdown.c \
- signals.c special.c \
- tcpint.c time.c \
- udpint.c util.c
-
- OBJS = \
- access.o addr.o \
- builtins.o \
- child.o conf.o connection.o \
- env.o exit.o \
- flags.o \
- ident.o init.o int.o intcommon.o internals.o \
- log.o logctl.o \
- main.o msg.o \
- nvlists.o \
- parse.o parsers.o \
- reconfig.o retry.o \
- sconf.o server.o service.o servtab.o shutdown.o \
- signals.o special.o \
- tcpint.o time.o \
- udpint.o util.o
-
- OPT=options.opt
-
- OPT_SOURCE=options.c
- OPT_HEADER=options.h
- OPT_OBJECT=options.o
-
- SOURCES = $(SRCS) $(OPT_SOURCE)
- HEADERS = $(HDRS) $(OPT_HEADER)
- OBJECTS = $(OBJS) $(OPT_OBJECT)
-
- INCLUDEDIR = -I$(HOME)/.links/includes
- MANPATHDIR = -I$(HOME)/.links/manpages # path up to man{1,2,etc}
- INSTALLDIR = /usr/etc
-
-
- #
- # You may modify the following variables but you probably don't need to.
- #
-
- PROGRAM = $(NAME)
- MANSECTION = 1
- MANSUBSECTION = # like V,X,l
- MANPAGE = $(PROGRAM).$(MANSECTION)$(MANSUBSECTION)
- MANDIR = $(MANPATHDIR)/man$(MANSECTION)
-
- CC = cc # used for compiler-specific options
- CC_FLAGS = $(DEBUG) # used for generic options
-
- XMODE = -m 700 # mode for executables
- FMODE = -m 640 # mode for anything but executables
- INSTALL = install -c
-
- LINT_FLAGS = -hbux
- PAGER = less
-
- CPP_DEFS = $(VERSION_DEF) $(DEFS)
-
- #
- # The following variables do not need to be changed
- #
-
- VERSION_DEF = -DVERSION=\"$(PROGRAM)\ Version\ $(VERSION)\"
- CPP_FLAGS = $(CPP_DEFS) $(INCLUDEDIR)
- CFLAGS = $(CPP_FLAGS) $(CC_FLAGS)
-
- all: $(PROGRAM) itox
-
- itox: itox.c
- $(CC) $(DEBUG) $(INCLUDEDIR) itox.c -o $@ $(LDFLAGS) -lmisc -lsio -lstr
-
- $(PROGRAM): $(OBJECTS)
- $(CC) $(DEBUG) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBS)
-
- tags: $(HEADERS) $(SOURCES)
- ctags -w $(HEADERS) $(SOURCES)
-
- checkout:
-
- lint:
- lint $(LINT_FLAGS) $(CPP_FLAGS) $(MODULE) 2>&1 | $(PAGER)
-
- lintall: $(OPT_HEADER)
- lint $(LINT_FLAGS) $(CPP_FLAGS) $(SOURCES) 2>&1 | $(PAGER)
-
- LINT_IGNORE=RCSid|warning: possible pointer alignment problem|warning: argument op unused|warning: struct/union iovec never defined|warning: null effect|(sigprocmask|sigaction) multiply declared|argument code unused
-
- lintq: $(OPT_HEADER)
- lint $(LINT_FLAGS) $(CPP_FLAGS) $(SOURCES) 2>&1 | egrep -v '$(LINT_IGNORE)' | $(PAGER)
-
- clean:
- rm -f $(OBJECTS) $(PROGRAM) core
-
- xclean: clean
- rm -f $(OPT_SOURCE) $(OPT_HEADER)
-
- install: $(PROGRAM)
- $(INSTALL) $(XMODE) $(PROGRAM) $(INSTALLDIR)
- if test "$(MANPAGE)" -a "$(MANDIR)" ; then $(INSTALL) $(FMODE) $(MANPAGE) $(MANDIR) ; fi
-
- uninstall:
- a=`pwd` ; cd $(INSTALLDIR) ;\
- if test $$a != `pwd` ; then rm -f $(PROGRAM) ; fi
- a=`pwd` ; cd $(MANDIR) ;\
- if test $$a != `pwd` ; then rm -f $(MANPAGE) ; fi
-
- #
- # Distribution section
- # This section contains the 2 targets for distribution support: dist, dirs
- # "dist" checks out all files to be distributed
- # "dirs" prints a list of directories to be included in the distribution.
- # These directories should have a Makefile with a "dist" target
- #
- SUPPORT_FILES = sample.conf PORTING BUG-REPORTS itox.c README.FIRST
- DISTRIBUTION_FILES = $(HDRS) $(SRCS) $(MANPAGE) $(SUPPORT_FILES)
- DIRS =
-
- dist1:
-
- dist: dist1 $(OPT_SOURCE) $(OPT_HEADER)
- -co -q $(DISTRIBUTION_FILES)
-
- dirs:
- @echo $(DIRS)
-
- #
- # This part of the file shows how to make $(OBJECTS)
- #
-
-
-
- #
- # Header file dependencies
- #
- addr.h: defs.h
- if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
-
- builtin.h: defs.h
- if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
-
- conf.h: service.h
- if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
-
- int.h: server.h
- if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
-
- parse.h: defs.h
- if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
-
- sconf.h: defs.h log.h mask.h
- if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
-
- server.h: defs.h service.h connection.h
- if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
-
- service.h: defs.h sconf.h builtin.h
- if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
-
- state.h: mask.h sconf.h conf.h
- if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
-
- connection.h: mask.h service.h
- if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
-
- #
- # Object file dependencies
- #
- access.o: access.h addr.h connection.h service.h state.h
- addr.o: addr.h defs.h
- builtins.o: builtin.h config.h defs.h server.h
- child.o: attr.h server.h state.h $(OPT_HEADER)
- conf.o: attr.h conf.h config.h defs.h service.h state.h
- connection.o: connection.h state.h
- sconf.o: addr.h attr.h defs.h sconf.h state.h
- env.o: attr.h defs.h sconf.h
- exit.o: server.h state.h
- flags.o: defs.h flags.h state.h
- ident.o: defs.h server.h
- init.o: defs.h conf.h config.h state.h $(OPT_HEADER)
- int.o: config.h defs.h int.h server.h
- intcommon.o: config.h defs.h int.h server.h state.h
- internals.o: conf.h config.h server.h service.h state.h
- log.o: access.h defs.h logoptions.h server.h state.h
- logctl.o: config.h defs.h log.h service.h state.h
- main.o: service.h state.h
- msg.o: config.h defs.h state.h $(OPT_HEADER)
- nvlists.o: defs.h logoptions.h service.h
- parse.o: addr.h attr.h conf.h defs.h parse.h service.h
- parsers.o: addr.h config.h defs.h parse.h sconf.h
- reconfig.o: access.h conf.h defs.h server.h service.h state.h
- retry.o: access.h config.h connection.h server.h state.h
- server.o: access.h config.h connection.h logoptions.h server.h state.h
- service.o: access.h attr.h config.h connection.h logoptions.h server.h service.h state.h $(OPT_HEADER)
- servtab.o: service.h state.h
- shutdown.o: defs.h
- signals.o: config.h defs.h flags.h state.h
- special.o: attr.h builtin.h conf.h config.h connection.h server.h state.h $(OPT_HEADER)
- tcpint.o: access.h config.h defs.h int.h
- time.o: defs.h
- udpint.o: access.h config.h defs.h int.h
- util.o: config.h defs.h
-
-